home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / c / pro22 / basstr.h next >
Text File  |  1990-06-21  |  1KB  |  47 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)basstr.h    1.4 - 90/06/21" */
  5.  
  6. /*man---------------------------------------------------------------------------
  7. NAME
  8.      basstr - BASIC string library
  9.  
  10. SYNOPSIS
  11.      #include "basstr.h"
  12.  
  13. DESCRIPTION
  14.      C library of string functions adapted from BASIC.
  15.  
  16. SEE ALSO
  17.      cvtss.
  18.  
  19. ------------------------------------------------------------------------------*/
  20. #ifndef BASSTR_H    /* prevent multiple includes */
  21. #define BASSTR_H
  22.  
  23. /* macros */
  24. #define NUL    ('\0')    /* nul character */
  25.  
  26. /* function declarations */
  27. #if __STDC__ == 1
  28. int cvtss(char *t, const char *s, int m, int n);
  29. #else
  30. int cvtss();
  31. #endif
  32.  
  33. /* cvtss m macros */
  34. #define CVT_TP        (0x0001)    /* trim the parity bit */
  35. #define CVT_XSP        (0x0002)    /* discard spaces and tabs */
  36. #define CVT_XCTL    (0x0004)    /* discard control characters */
  37. #define CVT_XLEADSP    (0x0008)    /* discard leading spaces and tabs */
  38. #define CVT_1SP        (0x0010)    /* reduce spaces, tabs to one space */
  39. #define CVT_UPPER    (0x0020)    /* convert lowercase to uppercase */
  40. #define CVT_BTOP    (0x0040)    /* convert [ to ( and ] to ) */
  41. #define CVT_XTRAILSP    (0x0080)    /* discard trailing spaces and tabs */
  42. #define CVT_QUOTES    (0x0100)    /* do not alter chars inside single or
  43.                      double quotes except for parity bit
  44.                      trimming */
  45.  
  46. #endif    /* #ifndef BASSTR_H */
  47.